<table class="from_table2">
	  <tr>
		<td align="left" class="td1">　
		  <tpl> $langComplaintLawType </tpl>
		  ：
		  <select name="complaint_report_type" onchange="ajax_type(this.value);" style="border:1px solid #CCCCCC">
		<option <tpl> if $type eq '' || $type eq 0 </tpl> selected="selected" <tpl> /if </tpl> value="0"><tpl> $langCompAll </tpl></option>
		<tpl> foreach from=$complaint_report_type key=key item=line </tpl>
			<tpl> if $key >= 5</tpl>
				<option <tpl> if $type eq $key </tpl> selected="selected" <tpl> /if </tpl> value="<tpl> $key </tpl>"><tpl> $line </tpl></option>
			<tpl> /if </tpl>
		<tpl> /foreach </tpl>
		</select></td>
      </tr>
  </table>
<form id="form1" name="form1" action="complaint.manage.php?action=del&complaint_report=<tpl> $complaint_report </tpl>" method="post">  
 <table class="from_table2_one" style="margin-top:10px;">
      <thead>
	  <tr class="area_ajax_list_title">
	  	<th class="pd-left" width="50"><tpl> $langComplaintDelect </tpl></th>
      	<th width="200"><tpl> $langComplaintLawReason </tpl></th>
	  <!-- <td>相关商品</td> -->
      	<th width="150"><tpl> $langComplaintByLaw </tpl></th>
      	<th width="100"><tpl> $langComplaintLawTime </tpl></th>
      	<th width="150"><tpl> $langComplaintOperatorEstate </tpl></th>
      	<th width="50"><tpl> $langCOperation </tpl></th>
    </tr>
	</thead>
	<tpl> if $complaint_receive_list[0].complaint_report_id neq'' </tpl>
		<tpl> section name=loop loop=$complaint_receive_list </tpl>
   <tr>
	  <td class="pd-left-1" width="50"><input name="complaint_report_id[]" type="checkbox" value="<tpl> $complaint_receive_list[loop].complaint_report_id </tpl>" /></td>
		<td width="200">
	        <tpl> assign var='c_r_type' value=$complaint_receive_list[loop].c_r_type </tpl>
	  <tpl> $complaint_report_type[$c_r_type] </tpl>		</td>
			<!-- <td>
			<a href="<tpl> $site_url </tpl>/home/product.php?action=view&pid=<tpl> $complaint_receive_list[loop].p_code </tpl>" target="_blank"><tpl> $complaint_receive_list[loop].p_name </tpl></a>
			</td> -->
		<td width="150"><a href="<tpl> $site_url </tpl>/store/userinfo.php?userid=<tpl> $complaint_receive_list[loop].c_r_member_id </tpl>" target="_blank">
	  <tpl> $complaint_receive_list[loop].c_r_login_name </tpl></a></td>
		<td width="100"><tpl> $complaint_receive_list[loop].c_r_add_time </tpl></td>
		<td width="150">
			<tpl> assign var = 'c_r_handling' value = $complaint_receive_list[loop].c_r_handling_state </tpl>
	  <tpl> $baseconfig_handling[$c_r_handling] </tpl>		</td>
		<td width="50">
	  <a href="javascript:;" onclick="ajax_view('<tpl> $complaint_receive_list[loop].complaint_report_id </tpl>');" title="<tpl> $langCview </tpl>" class="view_a_pic">	 </a></td>
	</tr>
	<tpl> /section </tpl>
	
	<tpl> else  </tpl>
	<tr>
		<td colspan="6" align="center"><tpl> $langComplaintMomentNotContent </tpl></td>
	</tr>
	<tpl> /if  </tpl>
  </table>
  <tpl> if $complaint_receive_list[0].complaint_report_id neq'' </tpl>
  <div class="table-5-bottom">
  	<div class="p-left">
		  <span class="btn_left"><input class="btn_submit" name="selectall" type="button" id="selectall" value="<tpl> $langComplaintAllSelect </tpl>" /></span>
		  <span class="btn_left">
			<input class="btn_submit" name="negative" type="button" id="negative" value="<tpl> $langComplaintContrartSelect </tpl>" /></span>
			  <span class="btn_left">
			<input class="btn_submit" type="button" id="delbutton" name="delbutton" value="<tpl> $langComplaintDeleteLaw </tpl>"/></span></div>
			<div class="btn_marginright"><tpl> $page_list </tpl></div>
  </div>
  <tpl> /if  </tpl>
</form>
<div id="question" style="display:none; cursor: default; padding:10px"> 
        <b style=" font-size:14px; margin-top:10px; line-height:50px; height:50px;padding-top:10px; padding-bottom:10px"><tpl> $langComplaintConfirmDelete </tpl></b> <br />
        <input type="button" id="yes" value="<tpl> $langCYes </tpl>"  style=" border:1px solid #CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/> 
        <input type="button" id="no" value="<tpl> $langCNo </tpl>"  style="border:1px solid #CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/>
		<input type="hidden" id="del_value" />
</div> 
<script>
$(document).ready(function() {
var question;
	$('#negative').click(
		function(){
			$('#form1 input[@type=checkbox]').each(function(){
				$(this).attr('checked',!$(this).attr('checked'))
			})
		}
	);
	$('#selectall').click(
		function(){
			$('#form1 input[@type=checkbox]').each(function(){
				$(this).attr('checked',true)
			})
		}
	);
	
	//删除操作
	var options_del = {
		beforeSubmit:  function(){showLoading(showText);},
		success:       function(msg){
						hideLoading();
						showMessage(msg.message,msg.type);
						if(msg.type == '1'){
							ShowDiv = "result_content";
							<tpl> if $type eq'' </tpl>
								getPageContent("complaint.manage.php?action=ajax_list&class=<tpl> $complaint_report </tpl>");
							<tpl> else </tpl>
								getPageContent("complaint.manage.php?action=ajax_list&class=<tpl> $complaint_report </tpl>&type="+<tpl> $type </tpl>);
							<tpl> /if </tpl>
						}
					},
		type:      'post',
		dataType:  'json'
	};
	/* 
	$("#form1").validate({
		errorClass: "wrong",
		rules: {
			complaint_report_id: {requireChecked:true}
		},
		messages: {
			complaint_report_id: {required:"请选择删除的信息"}
		},
		submitHandler: function() {
			$('#form1').ajaxSubmit(options_del);
		}
	});	
	 */question = $('#question')[0];
	$("#delbutton").click(function(){
		
		$.blockUI(question, { width: '275px' });
	});
	
	$('#yes').click(function() {
			//$.blockUI("<h1>Remote call in progress...</h1>" );
			$.unblockUI();
			$('#form1').ajaxSubmit(options_del);			
			return false;
		});
	$('#no').click($.unblockUI);

});

//跳转
function ajax_type(str){
	ShowDiv = 'result_content';
	getPageContent('complaint.manage.php?action=ajax_list&class=<tpl> $complaint_report </tpl>&type='+str);
}
//查看
function ajax_view(str){
	ShowDiv = 'result_content';
	getPageContent('complaint.manage.php?action=view&complaint_report=<tpl> $complaint_report </tpl>&complaint_report_id='+str);
}
</script>